<template>
  <div>
    <div class="personal-msg-wrap">
      <img :src="doctorInfo.avatar" alt="" width="50px" class="personal-avatar">
      <div class="personal-msg">
        <p class="personal-msg-name">{{doctorInfo.name}}<el-tag type="warning" size="mini" class="personal-msg-tag">
          {{ doctorInfo.position }}</el-tag></p>
        <p class="personal-msg-more">所在科室：<span>{{doctorInfo.departmentName}}</span></p>
        <p class="personal-msg-more">所在医院：<span>{{doctorInfo.hospitalName}}</span></p>
        <a @click="EmitInfo" class="personal-msg-modifier">申请会诊</a>
      </div>
      <div class="personal-msg" style="margin-left: 100px">
        <p class="personal-msg-name">详细资料</p>
        <p class="personal-msg-more">年龄：<span>{{doctorInfo.age}}</span></p>
        <p class="personal-msg-more">资历：<span>{{doctorInfo.career}}年</span></p>
        <p class="personal-msg-more">值班时间：<span>{{doctorInfo.spare}}</span></p>
      </div>
      <div class="personal-msg" style="margin-left: 100px;margin-top: 40px">
        <p class="personal-msg-more">邮箱：<span>{{doctorInfo.email}}</span></p>
        <p class="personal-msg-more">电话：<span>{{doctorInfo.phone}}</span></p>
        <p class="personal-msg-more">擅长领域：<span>{{doctorInfo.major}}</span></p>
      </div>
    </div>

  </div>

</template>

<script>
export default {
  props: ['doctorInfo'],
  name: 'personalMsg',
  data() {
    return {

    }
  },
  computed: {

  },
  methods: {
    EmitInfo() {
      this.$emit('getDoctorInfo', this.doctorInfo)
    }
  }
}
</script>

<style rel="stylesheet/scss" lang="scss" scoped>
  .personal-msg-wrap {
    margin: 20px 80px;
    height: 160px;
    border: 1px solid $mainBdColor;
    border-radius: 5px;
    padding: 20px;
    display: flex;
    .personal-avatar{
      float: left;
      border-radius: 10%;
      width: 10%;
      //margin-top: 35px;
    }
    .personal-msg{
      line-height: 1;
      overflow: hidden;
      padding-left: 20px;
      color:$mainTextColor;
      .personal-msg-name{
        font-weight: 600;
        font-size: 18px;
        margin: 0px;
        line-height: 40px;
        .personal-msg-tag{
          margin-left: 20px;
          vertical-align: 1px;
        }
      }
      .personal-msg-more{
        line-height: 20px;
          span{
            margin-left: 5px;
          }
      }
      .personal-msg-modifier{
        display: inline-block;
        margin-top: 20px;
        color: #509ad9;
      }
    }
  }
</style>
